package com.xxxx.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.seckill.pojo.User;
import com.xxxx.seckill.vo.LoginVo;
import com.xxxx.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author lulongfei
 * @since 2022-04-20
 */
public interface IUserService extends IService<User> {
    /**
     * 登录
     *
     * @param loginVo  登录信息
     * @param request  请求体
     * @param response 响应体
     * @return respBean
     */
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * 根据cookie获取用户
     *
     * @param userTicket 用户信息
     * @param request    请求体
     * @param response   响应体
     * @return User
     */
//    User getUserByCookie(String userTicket, HttpServletRequest request, HttpServletResponse response);

    /**
     * 更新密码
     *
     * @param userTicket 请求体
     * @param password   密码
     * @param request    请求体
     * @param response   响应体
     * @return respBean
     */
//    RespBean updatePassword(String userTicket, String password, HttpServletRequest request, HttpServletResponse response);

    /**
     * 数据初始化
     * @return respBean
     */
    RespBean doCache() throws IOException;
}
